home *** CD-ROM | disk | FTP | other *** search
/ PC Gamer (Italian) 30 / PC Gamer IT CD 30 1-2.iso / MOTS / GAMEDATA / EPISODE / JKM_PCG.GOO / cog_s1l2_elev_switch2.cog < prev    next >
Text File  |  1998-02-25  |  3KB  |  111 lines

  1. # Jedi Knight Missions Cog Script
  2. #
  3. # S1L2_elev_switch2.cog
  4. #
  5. # [DS/RD/IS/JS/TL]
  6. #
  7. # (C) 1997 LucasArts Entertainment Co. All Rights Reserved
  8. # =========================================================
  9.  
  10. symbols
  11.  
  12. message activate
  13. message timer
  14. message pulse
  15.  
  16. surface button0                 linkid=1
  17. surface    button1                nolink
  18. surface    light0                linkid=4
  19. surface    light1                linkid=4
  20. surface    light2                linkid=4
  21. surface    light3                linkid=4
  22.  
  23. thing   elevator                   linkid=2
  24. thing    trooper                linkid=3
  25.  
  26. flex    start_wait=0.25           desc=pause_before_moving_up
  27. flex    sleeptime=2.0
  28. flex    speed=4.0
  29. int     done0=0                         local
  30.  
  31. #cog     storm0
  32. #cog     storm1
  33. #cog     storm2
  34.  
  35. sound   wav0=Activate02.wav
  36. sound    troopervoice=ST50149.wav
  37. sound    kyle
  38. sound    kyle2
  39. sound    alarm=00alarmloop03.wav
  40. sound    transound
  41. sound   tranactive
  42.  
  43. int     soundnum                        local
  44. end
  45.  
  46. # =========================================================
  47.  
  48. code
  49.     
  50. activate:                 
  51.        if ((GetSenderId() == 2) && (GetCurFrame(elevator) != 0))
  52.     {
  53.         SetTimer(sleeptime);
  54.                 PlaySoundThing(tranactive, elevator, 1, -1, -1, 0);
  55.     }
  56.     
  57.     if (GetSenderId() == 1) 
  58.     {
  59.                 if (done0 == 1) return;
  60.                 else if (done0 == 0)
  61.                 {
  62.                    done0=1;
  63. //                        SendMessage(storm0, entered);
  64. //                        SendMessage(storm1, entered);
  65. //                        SendMessage(storm2, entered);
  66.                         
  67.                         SetWallCel(button0, 1);
  68.                    PlaySoundPos(wav0, SurfaceCenter(button0), 0.6, -1, -1, 0);
  69.                 PlaySoundLocal(alarm, 4, 0, 0);
  70.                 MoveToFrame(elevator, 2, speed);
  71. //                   PlaySoundThing(transound, elevator, 2, -1, -1, 1);  
  72.                         sleep(2.5);
  73.                 PlaySoundLocal(kyle, 3, 0, 256);
  74.                         SetPulse(0.25);
  75.                         sleep(3.5);
  76.                 PlaySoundPos(troopervoice,SurfaceCenter(button1), 4, -1, -1, 256);
  77.                                                 
  78.  
  79.                         sleep(4.5);
  80.                 PlaySoundLocal(kyle2, 3, 0, 256);
  81.                 } 
  82.         }              
  83.     return;
  84.  
  85. # .........................................................
  86.  
  87. timer:
  88.        MoveToFrame(elevator, 0, 8);    
  89.     soundnum=PlaySoundThing(transound, elevator, 1, -1, -1, 1);
  90.         return;
  91.  
  92. #..........................................................
  93. pulse:
  94.         SetWallCel(light0, 1);
  95.       SetWallCel(light1, 1);
  96.            SetWallCel(light2, 1);
  97.         SetWallCel(light3, 1); 
  98.         return;  
  99.  
  100. arrived:
  101.         if (GetCurFrame(elevator) != 0) return;
  102.         
  103.         if (GetCurFrame(elevator) == 0)
  104.         {
  105.                 StopSound(soundnum, 0);
  106.         }
  107.         return;
  108.  
  109. end
  110.